package com.yanqu.road.entity.activity.newyearbag;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_c_new_year_bag_openid_userid")
public class NewYearBagOpenUserLimit extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "openId", update = true)
    private String openId;

    @FieldTypeAnnotation(desc = "现金次数")
    private NewYearBagUserTimesData xianJinTimes;

    @FieldTypeAnnotation(desc = "实物次数")
    private NewYearBagUserTimesData shiWuTimes;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        if(!Objects.equals(this.openId, openId)) {
            this.openId = openId;
            setUpdateOption();
        }
    }

    public NewYearBagUserTimesData getXianJinTimes() {
        return xianJinTimes;
    }

    public void setXianJinTimes(NewYearBagUserTimesData xianJinTimes) {
        this.xianJinTimes = xianJinTimes;
        setUpdateOption();
    }

    public NewYearBagUserTimesData getShiWuTimes() {
        return shiWuTimes;
    }

    public void setShiWuTimes(NewYearBagUserTimesData shiWuTimes) {
        this.shiWuTimes = shiWuTimes;
        setUpdateOption();
    }
}
